From: Giovanni Campagna Date: Mon, 20 Jan 2014 22:21:14 +0000 (+0100) Subject: TelepathyClient: disconnect signals from destroyed ChatSources X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2871 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ccfc9f3ab06e33c5f25c0765f646143a33908f1b;p=gnome-shell.git TelepathyClient: disconnect signals from destroyed ChatSources Otherwise they keep firing if the source is destroyed by the user and they trigger Clutter warnings from touching invalid actors. https://bugzilla.gnome.org/show_bug.cgi?id=722660 --- diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index e69c2a18e..144d369b2 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -621,7 +621,11 @@ const ChatSource = new Lang.Class({ this.notify(); }, - _channelClosed: function() { + destroy: function(reason) { + if (this._destroyed) + return; + + this._destroyed = true; this._channel.disconnect(this._closedId); this._channel.disconnect(this._receivedId); this._channel.disconnect(this._pendingId); @@ -631,7 +635,14 @@ const ChatSource = new Lang.Class({ this._contact.disconnect(this._notifyAvatarId); this._contact.disconnect(this._presenceChangedId); - this.destroy(); + if (this._timestampTimeoutId) + Mainloop.source_remove(this._timestampTimeoutId); + + this.parent(reason); + }, + + _channelClosed: function() { + this.destroy(MessageTray.NotificationDestroyedReason.SOURCE_CLOSED); }, /* All messages are new messages for Telepathy sources */